<template>
    <view class="page">
    <view class="flex benben-position-layout flex flex-wrap align-center selectAccount_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
            <view   class='flex flex-wrap align-center justify-between flex-sub selectAccount_fd0_0'     >
            <view   class='flex flex-wrap align-center'  @tap.stop="handleJumpDiy" data-type="back" data-url="1"   >
        <text class='fu-iconfont2  selectAccount_fd0_0_c0_c0' >&#xE794;</text>
</view>
<text class='selectAccount_fd0_0_c1' >选择科目</text>
    <view   class='flex flex-wrap align-center selectAccount_fd0_0_c2'     >
        </view>
</view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
<!---flex布局flex布局开始-->
 <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout selectAccount_flex_1"   @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/skimmingChapter/skimmingChapter`">
            <template v-for = '(item,key0) in dataList'>
    <view   class='flex flex-wrap align-center selectAccount_fd1_0'  @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/skimmingChapter/skimmingChapter?id=${item.aid}`"    :key='key0'>
        <image class='selectAccount_fd1_0_c0' mode="aspectFit"  :src='STATIC_URL+"21.png"'></image>
<text class='flex-sub selectAccount_fd1_0_c1' >{{item.subject_name}}</text>
<text class='fu-iconfont2  selectAccount_fd1_0_c2' >&#xe7f2;</text>
</view>
    </template>
    
</view>
<!---flex布局flex布局结束-->
    
    </view>
</template>
<script>
    import {validate} from '@/common/utils/validate.js'
    export default {
        components:{},
        
        data(){
			return {"cityObj":{"type":"","altitude":"","latitude":"","longitude":"","speed":"","accuracy":"","address":{"country":"","province":"","city":"","district":""}},"dataList":[]};
		},
		computed:{
            
		},
		watch:{},
		onLoad(options){
            this.getcity()
		},
        onUnload() {
                
        },
		onReady(){
            
		},
		onShow(){
            
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //获取城市信息
                async getcity(){
                                    this.cityObj = await this.syncUniApi('getLocation', { type: 'gcj02', geocode: true })
                                    this.getclassList()
                },
                //获取科目列表
                async getclassList(){
                        //请求方法
    //数据验证
    
  let dataListData = await this.$api.post(global.apiUrls.post6302e4462c7bd, {
    city:this.cityObj.address.city
  });
  if (dataListData.data.code != 1) {
    this.$message.info(dataListData.data.msg);
    return
  } 
  let dataListinfo = dataListData.data;
  this.dataList = dataListinfo.data
                }
		}
    };
</script> 
<style lang="scss" scoped>
       .selectAccount_fd1_0{
        background:#fff;background-size: 100% !important;height:140rpx;padding:0rpx 32rpx 0rpx 32rpx;margin:0rpx 0rpx 24rpx 0rpx;background-size:100% auto !important;border-radius:16rpx 16rpx 16rpx 16rpx;
    }
    .selectAccount_fd1_0_c0{
        width:88rpx;height:88rpx;margin:0rpx 24rpx 0rpx 0rpx;border-radius:44rpx 44rpx 44rpx 44rpx;
    }
    .selectAccount_fd1_0_c1{
        -webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;line-height:45rpx;font-size:32rpx;font-weight:500;color:#333333;
    }
    .selectAccount_fd1_0_c2{
        font-size:26rpx;font-weight:500;color:#333;
    }
    .selectAccount_flex_1{
        margin:32rpx 32rpx 0rpx 32rpx;
    }
    .selectAccount_fd0_0{
        padding:0rpx 32rpx 0rpx 32rpx;height:88rpx;
    }
    .selectAccount_fd0_0_c0_c0{
        font-size:36rpx;font-weight:500;color:#333;line-height:36rpx;
    }
    .selectAccount_fd0_0_c1{
        font-size:36rpx;font-weight:500;color:#333333;line-height:50rpx;
    }
    .selectAccount_fd0_0_c2{
        width:36rpx;height:36rpx;
    }
    .selectAccount_flex_0{
        border-bottom:1px solid #eee;background:#fff;background-size: 100% !important;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
        .page{
            min-height: calc(100vh - var(--window-bottom));
            background:rgba(246, 247, 249, 1);background-size: 100% auto !important;
        }
</style>